<%@ Page Language="C#" MasterPageFile="~/Board.Master" AutoEventWireup="true" CodeBehind="MessageHistory.aspx.cs" Inherits="UserInterface.MessageHistory" %>
<%@ Register TagPrefix="cc" TagName="Pager" Src="~/UserControls/Pager.ascx" %>
<%@ Register TagPrefix="cc" TagName="MessageView" Src="~/UserControls/MessageView.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <div id="user-search">
        <h2><%= Resources.Resource.Search %></h2>
        <asp:Label ID="UsernameLabel" Text="<%$ Resources: Resource, Username %>" runat="server" />:
        <asp:TextBox ID="UsernameTextBox" runat="server" />
        <asp:Button ID="SearchButton" runat="server" Text="<%$ Resources: Resource, Search %>" OnClick="SearchButton_Click" />
    </div>
    
    <asp:PlaceHolder ID="MessageHistoryPlaceHolder" runat="server">
        <div id="user-info">
            <h2><%= Resources.Resource.User %>: <asp:Literal ID="UserInfoUsername" runat="server" /></h2>
            <p><asp:Literal ID="UserInfoDetailLiteral" runat="server" /></p>
        </div>
        
        <cc:Pager ID="TopPager" runat="server" />
        
        <cc:Repeater runat="server" ID="MessageRepeater">
            <ItemTemplate>
                <cc:MessageView ID="MessageView" Message="<%# Container.DataItem %>" DisplayForumTopicInfo="true" runat="server" />
            </ItemTemplate>
            <EmptyTemplate>
                <p><%=GetLocalResourceObject("NoMessagesFound")%></p>
            </EmptyTemplate>
        </cc:Repeater>
        
        <cc:Pager ID="BottomPager" runat="server" />
    </asp:PlaceHolder>
    
    <asp:PlaceHolder ID="UserNotFoundPlaceHolder" runat="server">
        <div id="user-not-found-message">
            <p><%= GetLocalResourceObject("UserNotFoundMessage") %></p>
        </div>
    </asp:PlaceHolder>
    
</asp:Content>